package com.pug;

import com.google.common.hash.BloomFilter;
import com.google.common.hash.Funnels;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;

import java.nio.charset.Charset;

/**
 * Author: lqm
 * create: 2022/4/26 8:31
 * Lover: lqx
 *
 * @see
 */
@MapperScan("com.pug")
@EnableDiscoveryClient
@SpringBootApplication
//@SpringBootApplication(exclude = MongoAutoConfiguration.class)
public class UserServerApplication {
    public static BloomFilter<String> filter_id;
    public static BloomFilter<String> filter_phone;
    public static void main(String[] args) {
        //创建guava过滤器
        filter_id=BloomFilter.create(Funnels.stringFunnel(Charset.defaultCharset()),1500,0.01);
        filter_phone=BloomFilter.create(Funnels.stringFunnel(Charset.defaultCharset()),1500,0.01);
        filter_phone.put("19100188237");
        filter_phone.put("19914508961");
        filter_id.put("Ngq38M8cYPLoj0gEqyM5rA==");
        filter_id.put("QQx1pA0D4rJKdppZ/5Papg==");
        SpringApplication.run(UserServerApplication.class);
    }
}
